@extends('base')

@section('content')
    <div class="layui-card">
        <div class="layui-card-body">
            <form action="{{route('caiwu.finance.update',['id'=>$model->id])}}" method="post" class="layui-form">
                {{csrf_field()}}
                {{method_field('put')}}
                <div class="layui-form-item">
                    <label for="" class="layui-form-label">选择订单</label>
                    <div class="layui-input-inline" style="width: 90px">
                        <button type="button" id="chose_order" class="layui-btn layui-btn-sm layui-disabled" disabled>点击选择</button>
                    </div>
                    <input type="hidden" name="order_id" value="0" id="order_id">
                    <div class="layui-word-aux layui-form-mid" id="order_tips">订单编号：{{$model->num}}</div>
                </div>
                <div class="layui-form-item">
                    <label for="" class="layui-form-label">收支方式</label>
                    <div class="layui-input-block">
                        <select name="pay_type" lay-verify="required">
                            @foreach(config('freeswitch.pay_type') as $k => $v)
                                <option value="{{$k}}" @if($model->pay_type==$k) selected @endif >{{$v}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="" class="layui-form-label">收支金额</label>
                    <div class="layui-input-block">
                        <input class="layui-input" type="number" name="money" value="{{$model->money}}" >
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="" class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea name="remark" class="layui-textarea" lay-verify="required" >{{$model->remark}}</textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="" class="layui-form-label">付款凭证</label>
                    <div class="layui-input-block">
                        @include('common.multiple_file',['file'=>$model->multiple_file])
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="go-close-refresh" >确认</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
@endsection


